package com.csjbot.snowbot_rogue.services;

import android.app.Presentation;
import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.view.Display;
import android.widget.ImageView;

import com.csjbot.csjbase.log.Csjlogger;
import com.csjbot.snowbot_rogue.R;
import com.csjbot.snowbot_rogue.utils.Constant;
import com.csjbot.snowbot_rogue.utils.SharePreferenceTools;


/**
 * Created by RYX on 2016/6/23.
 */
public class MyPresentation extends Presentation {
    private ImageView presentImageview, expression_backgroud;

    public MyPresentation(Context outerContext, Display display) {
        super(outerContext, display);
        Csjlogger.debug("MyPresentation new");
    }

    private SharePreferenceTools sharePreferenceTools;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.presentation_layout);
        presentImageview = (ImageView) findViewById(R.id.present_imageView);
        expression_backgroud = (ImageView) findViewById(R.id.expression_backgroud);

        sharePreferenceTools = new SharePreferenceTools(getContext());
        int default_color = sharePreferenceTools.getInt(Constant.SharePreference.EXPRESSION_FACE_COLOR, Color.parseColor("#FFFFFFFF"));
        expression_backgroud.setBackgroundColor(default_color);
        Csjlogger.debug("MyPresentation onCreate");
    }

    public ImageView getImageView() {
        return presentImageview;
    }

    public ImageView getExpressionBackgroud() {
        return expression_backgroud;
    }
}
